package com.dt76.smallloanbackendservice.controller.ysy;

import com.dt76.smallloanbackendservice.service.ysy.ReceivablesService;
import com.dt76.smallloanbackendservice.utils.Page;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping("/ysy")
public class ReceivablesController {
    @Autowired
    private ReceivablesService receivablesService;

    @RequestMapping("/receivables")
    @ResponseBody
    public Page qryPageConditionAll(@RequestParam("pageIndex") int pageIndex,
                                    @RequestParam("queryname")String queryname,
                                    @RequestParam("roleId")String roleId){
        System.out.println("成功调用远程服务:principalService>qryPageConditionAll>>>");
        return receivablesService.getAllUser(pageIndex,queryname,Integer.valueOf(roleId));
    }
}
